package lumis.service.rss;


import java.util.Collection;

import lumis.portal.PortalException;
import lumis.portal.authentication.SessionConfig;
import lumis.util.ITransaction;

/**
 * Manager responsible for RSS-related operations
 *
 * @version $Revision: 8618 $ $Date: 2007-12-18 11:34:20 -0200 (Tue, 18 Dec 2007) $
 * @since 4.1.0
 */
public interface IRssManager
{
	/**
	 * Generate the Rss Xml File 
	 * 
	 * @param sessionConfig
	 * @param rssConfig
	 * @param oldPath
	 * @param transaction
	 * @throws PortalException
	 */
	public void generateRssXmlFile(SessionConfig sessionConfig, RssConfig rssConfig, String oldPath, ITransaction transaction) throws PortalException;
	
	/**
	 * Returns the RssConfig for a Rss with the given id.
	 * 
	 * @param sessionConfig
	 * @param id
	 * @param transaction
	 * @return
	 * @throws PortalException
	 * @since 4.1.0
	 */
	public RssConfig get(SessionConfig sessionConfig, String id, ITransaction transaction) throws PortalException;
	
	/** Get the Rss ids by the Service Instance Id
	 * @param sessionConfig
	 * @param serviceInstanceId
	 * @param transaction
	 * @return
	 * @throws PortalException
	 * @since 4.1.0
	 */
	public Collection<String> getIdsByServiceInstanceId(SessionConfig sessionConfig, String serviceInstanceId, ITransaction transaction) throws PortalException;
	
	/**
	 * Verify if already exist a path specified to another RSS 
	 * 
	 * @param filePath
	 * @param notIncludingRssId
	 * @param transaction
	 * @return
	 * @throws PortalException
	 */
	public boolean validateUniqueFilePath(String filePath, String notIncludingRssId, ITransaction transaction) throws PortalException;
}
